<?php
/**
 * PasswordForm Form
 * 
 *  @author Redouane
 *  @since 21/0ç/2011
 */
class PasswordForm extends SellerForm{
	
    public function configure(){
	$this->useFields(array('email'));
        
	/* Labels */
	$this->widgetSchema->setLabels(array(
                    'email'          => 'Votre E-Mail',
	));
	    
                /* Validators */
    	$this->validatorSchema['email']  = new sfValidatorEmail(array('required' => true));   
	$this->validatorSchema['email']->setMessage('required', 'Veuillez renseigner une adresse Email');
	$this->validatorSchema['email']->setMessage('invalid', 'Adresse Email invalide');
    	
                $this->mergePostValidator(new bay3ValidatorLostPassword(
                    array(),array('invalid' => "Adresse Email inexistante")));
        
	$this->widgetSchema->setNameFormat('password[%s]');
	$this->widgetSchema->setFormFormatterName('div');
	$this->widgetSchema->getFormFormatter()->setTranslationCatalogue('front');
    	
    }
	
	
}